package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.IcPostUserLikeMapper;
import com.ruoyi.system.domain.IcPostUserLike;
import com.ruoyi.system.service.IIcPostUserLikeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 帖子用户喜爱关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-11
 */
@Service
public class IcPostUserLikeServiceImpl implements IIcPostUserLikeService 
{
    @Autowired
    private IcPostUserLikeMapper icPostUserLikeMapper;

    /**
     * 查询帖子用户喜爱关联
     * 
     * @param puId 帖子用户喜爱关联主键
     * @return 帖子用户喜爱关联
     */
    @Override
    public IcPostUserLike selectIcPostUserLikeByPuId(Long puId)
    {
        return icPostUserLikeMapper.selectIcPostUserLikeByPuId(puId);
    }

    /**
     * 查询帖子用户喜爱关联列表
     * 
     * @param icPostUserLike 帖子用户喜爱关联
     * @return 帖子用户喜爱关联
     */
    @Override
    public List<IcPostUserLike> selectIcPostUserLikeList(IcPostUserLike icPostUserLike)
    {
        return icPostUserLikeMapper.selectIcPostUserLikeList(icPostUserLike);
    }

    /**
     * 新增帖子用户喜爱关联
     * 
     * @param icPostUserLike 帖子用户喜爱关联
     * @return 结果
     */
    @Override
    public int insertIcPostUserLike(IcPostUserLike icPostUserLike)
    {
        return icPostUserLikeMapper.insertIcPostUserLike(icPostUserLike);
    }

    /**
     * 修改帖子用户喜爱关联
     * 
     * @param icPostUserLike 帖子用户喜爱关联
     * @return 结果
     */
    @Override
    public int updateIcPostUserLike(IcPostUserLike icPostUserLike)
    {
        return icPostUserLikeMapper.updateIcPostUserLike(icPostUserLike);
    }

    /**
     * 批量删除帖子用户喜爱关联
     * 
     * @param puIds 需要删除的帖子用户喜爱关联主键
     * @return 结果
     */
    @Override
    public int deleteIcPostUserLikeByPuIds(String puIds)
    {
        return icPostUserLikeMapper.deleteIcPostUserLikeByPuIds(Convert.toStrArray(puIds));
    }

    /**
     * 删除帖子用户喜爱关联信息
     * 
     * @param puId 帖子用户喜爱关联主键
     * @return 结果
     */
    @Override
    public int deleteIcPostUserLikeByPuId(Long puId)
    {
        return icPostUserLikeMapper.deleteIcPostUserLikeByPuId(puId);
    }
}
